package com.example.springboot.exception;

import lombok.Getter;

/**
 * 自定义的异常
 */

@Getter
public class ServiceException extends RuntimeException {

    private String code;

    public String getCode() {
        return code;
    }

    public ServiceException(String msg) {
        super(msg);
    }

    public ServiceException(String msg, Throwable cause) {
        super(msg, cause);
    }

    public ServiceException(String code, String mssage) {

        super(mssage);
        this.code = code;
    }
}

